package com.aaa.jvmtest.dui;

import java.util.ArrayList;
import java.util.List;

/**
 * 查看演示对象个数 堆转储 dump
 * 使用jvisualvm可视化工具进行 内存诊断
 *
 * @author Tu
 * @date 2022/5/12 18:02
 */
public class DuiNeiCunGuoGao {

    public static void main(String[] args) throws InterruptedException {
        List<Student> studentList = new ArrayList<>(10);
        for (int i = 0; i < 200; i++) {
            studentList.add(new Student());
        }
        Thread.sleep(1000000000L);
    }

}

class Student {
    //每个Student是1M内存
    private byte[] bytes = new byte[1024 * 1024];
}
